<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <Footer v-show="!$route.meta.isHidden"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header'
import Footer from '@/components/Footer'
export default {
  name: "App",
  components:{
    Header,
    Footer,
  },

  mounted() {
    //优化home页面和search页面的初始化请求，减少每次切换时产生的请求次数
    this.$store.dispatch('getCategoryList');
  }
}
</script>

<style scoped>

</style>
